The present invention relates to an image processing apparatus and, more particularly, to an image processing apparatus for generating a high-quality image from a two-dimensional color image signal sensed by a single-CCD color electronic camera device.
Generally in an electronic image sensing apparatus for sensing an image using an image sensor such as a multi-color filtered CCD, an image signal having all color information (RGB or a luminance value and color difference signals) for each pixel is generated from an image having the pixel value of only one of a plurality of colors (primary colors) for each of many pixels arrayed in an almost two-dimensional checkered pattern.
In generating an image signal containing all color information for each pixel, insufficient color information at each pixel position is interpolated using the pixel values of peripheral pixels having the insufficient color information.
However, the number of pieces of information of each color by an image signal from a single-CCD color image sensing element is essentially smaller than the total number of pixels of the image sensing element. Thus, an image signal generated by interpolation is blurred.
Particularly when an image signal is generated by interpolation using only adjacent pixels of the same color (insufficient color), this phenomenon typically occurs. In many cases, color information which should not originally exist at a pixel position is generated.
To prevent this phenomenon, conventional single-CCD color image sensing apparatuses adopt various interpolation methods.
FIGS. 15A and 15B show interpolation processing by a conventional image processing apparatus.
FIGS. 15A and 15B show the pixel array of a color image sensing element using a so-called Bayer array. Pixels of red (R), green (G), and blue (B) are arrayed in a checkered pattern.
To generate image information having pixel values (luminance information) of three, R, G, and B colors for each pixel from this array data, an interpolated pixel value of each color is most simply calculated by performing the following interpolation calculation using the pixel values of peripheral pixels in the same color as color information to be calculated among pixels included in a 3xc3x973 sub-matrix centered on a pixel to be interpolated.
For example, as shown in FIG. 15A, when an R pixel is positioned at the center of the sub-matrix, R22 is kept unchanged, and G22 and B22 are interpolated by adjacent pixel values.
As shown in FIG. 15B, when a G pixel is positioned at the center of the sub-matrix, G32 is kept unchanged, and R32 and B32 are interpolated by adjacent pixel values.
However, most of the conventional methods cannot attain a sufficient image quality though interpolation processing of the pixel value is simple at a high speed.
In the example shown in FIGS. 15A and 15B, as is apparent from the above-described equations, each color data exhibits the same results as those obtained when data is passed through a low-pass filter in units of several pixels. No high image quality can, therefore, be attained.
To the contrary, there is proposed an arrangement of obtaining a high-quality image by executing high-order interpolation using a wider sub-matrix to interpolate the high-frequency component of the spatial frequency, or adaptively changing the calculation method depending on complicated conditions in order to prevent generation of a false color (see International Patent Laid-Open Nos. 61-501423 and 61-501424 and U.S. Pat. No. 5,805,217).
However, this processing must execute complicated calculation, and processing which changes depending on conditions must be done. Thus, this arrangement cannot cope with high-speed, real-time processing.
For example, to perform calculation whose processing changes depending on conditions in real time, calculation for each condition must be done in advance, and when conditions are determined, proper results must be selected from the prepared ones. This increases the circuit scale and power consumption.
To perform high-order interpolation, values at two points are required in one direction except for an interpolation point. To interpolate each color signal by pixel values of the same color, the number of R or B pixels essentially smaller than the number of G pixels must be 9xc3x979 original pixels for high-order interpolation in two directions (X and Y directions).
Hence, the number of calculation processes increases, and in addition the capacity of a buffer memory for temporarily storing pixel information for calculation increases in accordance with the number of pixels.
An image blurred by interpolation is made clearer by adjusting spatial frequency characteristics after interpolation processing to emphasize a high-frequency component. However, a high frequency which does not originally exist cannot be emphasized. A blurred image cannot be satisfactorily made clear without processing of leaving sufficient high-frequency information in interpolation.
The present invention has been made to overcome the conventional drawbacks, and has as its object to provide an image processing apparatus capable of obtaining a high-quality image without performing complicated pixel interpolation processing.
To achieve the above object, according to the present invention, there is provided an image processing apparatus for interpolating, for an image signal which is made up of many pixels arranged on a two-dimensional plane and has a pixel value corresponding to any one of a plurality of color signals for each pixel, a pixel value at an arbitrary interpolation point arranged on the two-dimensional plane by pixel values of peripheral pixels, and generating an image signal having pixel values of all the color signals for each interpolation point, comprising an interpolation unit for interpolating a pixel value of each color signal at the interpolation point using pixel values of pixels in the same color falling within a predetermined interpolation region including the interpolation point, and outputting the pixel value as an interpolated pixel value at the interpolation point for each color signal, a compensation value calculation unit for generating a pixel compensation value for compensating a pixel value of the interpolation point using pixel values of a plurality of pixels around the interpolation point that fall within a compensation region wider than and including the interpolation region, and a compensation unit for compensating the interpolated pixel value of each color signal at the interpolation point that is output from the interpolation unit by using the pixel compensation value corresponding to the interpolation point that is obtained by the compensation value calculation unit, and outputting the interpolated pixel value compensated as a new pixel value of each color signal at the interpolation point.